<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
	<title>个人信息</title>
	<meta name="decorator" content="default"/>
	<script type="text/javascript">
		$(document).ready(function() {
//            $("body").addClass("gray-bg");

			$("#inputForm").validate({
				submitHandler: function(form){
					loading('正在提交，请稍等...');
					form.submit();
				},
				errorContainer: "#messageBox",
				errorPlacement: function(error, element) {
					$("#messageBox").text("输入有误，请先更正。");
					if (element.is(":checkbox")||element.is(":radio")||element.parent().is(".input-append")){
						error.appendTo(element.parent().parent());
					} else {
						error.insertAfter(element);
					}
				}
			});
		});
	</script>
</head>
<body>
<div class="wrapper wrapper-content">
    <div class="row animated fadeInRight">

        <div class="col-sm-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h5>个人资料</h5>
                    <div class="ibox-tools">
                        <a class="dropdown-toggle" data-toggle="dropdown" href="#" aria-expanded="false">
                            编辑 <i class="fa fa-caret-down"></i>
                        </a>
                        <ul class="dropdown-menu dropdown-user">
                            <%--<li><a href="#" onclick="openDialogView('更换头像', '${ctx}/sys/user/imageEdit','800px', '500px')">更换头像</a></li>--%>
                            <li><a href="#" onclick="openDialog('编辑资料', '${ctx}/sys/user/infoEdit','800px', '500px')">编辑资料</a>
                            </li>
                            <li><a href="#" onclick="openDialog('修改密码', '${ctx}/sys/user/modifyPwd','800px', '500px')">更换密码</a>
                            </li>
                        </ul>
                    </div>
                </div>
                <div class="ibox-content">

                    <!-- 0:隐藏tip, 1隐藏box,不设置显示全部 -->
                    <script type="text/javascript">top.$.jBox.closeTip();</script>
                    <div class="row">
                        <%--<div class="col-sm-2" style="margin-bottom: 10px;">--%>
                            <%--<img alt="image" class="img-responsive" src="/userfiles/8/images/WechatIMG162.jpeg">--%>
                            <%--<a href="#" onclick="openDialogView('更换头像', '/jf/sys/user/imageEdit','800px', '500px')" class="btn"><i class="ace-icon fa fa-cog"></i> 更换头像</a>--%>
                        <%--</div>--%>
                        <div class="col-sm-8">
                            <div class="table-responsive">
                                <p>基本资料 - <a href="#" onclick="openDialog('编辑资料', '${ctx}/sys/user/infoEdit','800px', '500px')">修改</a></p>
                                <table class="table table-bordered">
                                    <tbody>
                                    <tr>
                                        <td width="200px"><strong>姓名</strong></td>
                                        <td>${user.name}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>邮箱</strong></td>
                                        <td>${user.email}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>手机</strong></td>
                                        <td>${user.mobile}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>电话</strong></td>
                                        <td>${user.phone}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>公司</strong></td>
                                        <td>${user.company.name}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>部门</strong></td>
                                        <td>${user.office.name}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>备注</strong></td>
                                        <td>${user.remarks}</td>
                                    </tr>
                                    </tbody>
                                </table>
                                <p>注册信息</p>
                                <table class="table table-bordered">
                                    <tbody>
                                    <tr>
                                        <td width="200px"><strong>用户名</strong></td>
                                        <td class="">${user.loginName}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>注册手机号码</strong></td>
                                        <td>${user.mobile}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>用户角色</strong></td>
                                        <td>${user.roleNames}</td>
                                    </tr>
                                    <tr>
                                        <td><strong>用户类型</strong></td>
                                        <td>${fns:getDictLabel(user.userType, 'sys_user_type', '无')}</td>
                                    </tr>
                                    </tbody>
                                </table>
                                <strong>上次登录</strong>
                                IP: ${user.oldLoginIp}&nbsp;&nbsp;&nbsp;&nbsp;时间：<fmt:formatDate value="${user.oldLoginDate}" type="both" dateStyle="full"/>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>

</body>
</html>